<template>
    <div class="person">
      <!-- 内联事件处理器 -->
      <button @click="count++">count++</button>
      {{ count }}

      <button @click="add">点击累加</button>
      {{ num }}
    </div>
  </template>

<script setup lang="ts">
  import { ref } from 'vue';
  let count = ref(1);

  let num = ref(0)
  function add (){
    num.value += 1
  }
</script>

<style scoped>
.person {
    background-color: aqua;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
}

button {
    margin: 0 5px;
}
</style>